home *** CD-ROM | disk | FTP | other *** search
- Path: rcp6.elan.af.mil!rscernix!danpop
- From: danpop@mail.cern.ch (Dan Pop)
- Newsgroups: comp.sources.wanted,comp.lang.c,comp.unix.programmer
- Subject: Re: Seek unix2dos.c OR help with tr
- Date: 22 Mar 96 18:46:50 GMT
- Organization: CERN European Lab for Particle Physics
- Message-ID: <danpop.827520410@rscernix>
- References: <danpop.826917054@rscernix> <4is3c3$jmp@ns.broadvision.com>
- NNTP-Posting-Host: ues5.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
-
- In <4is3c3$jmp@ns.broadvision.com> patrick@broadvision.com (Patrick Horgan) writes:
-
- >In article <danpop.826917054@rscernix>, danpop@mail.cern.ch (Dan Pop) writes:
-
- >>As for Kazimir's example, a "better" definition would be:
- >>
- >>#define CTRL(C) ((C) - 'A' + 1)
- >
- >If I went down this path I'd choose ((C) - '@' )...somehow the + 1 seems as if it
- >will lead to further silly misunderstandings by junior programmers...
-
- And your approach will confuse anybody who doesn't know the ASCII table
- by heart :-) In this context, '@' _is_ a magical constant.
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-